Has Files: Files on your models in one declaration
Declare a cover image, an ordered gallery, an intro video or a mixed media list on any Eloquent model, then read and manage them as $product->file('gallery'). Files are checked by their content before the model is written, saved right after it, and processed by Laravel Uploader only when you ask. It is AI ready: php artisan boost:install teaches your coding agent the whole package through Laravel Boost.
Compatibility
Each line is released for the versions in its row, read from that release's composer.json. Pick the line that matches your project; a combination not listed isn't supported. Find the right line of every package for your project.
| Line | Latest release | PHP | Laravel | Status | Docs |
|---|---|---|---|---|---|
| v13.x | v13.0.0 Nov 29, 2026 | 8.3 – 8.5 | 13 | Current | Docs: Read the v13.x docs |
| v12.x | v12.0.0 Nov 29, 2026 | 8.2 – 8.5 | 12 | Maintained | Docs: Read the v12.x docs |
| v11.x | v11.0.0 Nov 29, 2026 | 8.2 – 8.4 | 11 | MaintainedLaravel 11 no longer gets security fixes | Docs: Read the v11.x docs |
| v10.x | v10.0.0 Nov 29, 2026 | 8.1 – 8.3 | 10 | MaintainedLaravel 10 no longer gets security fixes | Docs: Read the v10.x docs |
| v9.x | v9.0.0 Nov 29, 2026 | 8.0 – 8.2 | 9 | MaintainedLaravel 9 no longer gets security fixes | Docs: Read the v9.x docs |
| v8.x | v8.0.0 Nov 29, 2026 | 8.0 – 8.1 | 8 | MaintainedLaravel 8 no longer gets security fixes | Docs: Read the v8.x docs |
| v7.x | v7.0.0 Nov 29, 2026 | 8.0 | 7 | MaintainedLaravel 7 no longer gets security fixes | Docs: Read the v7.x docs |
| v6.x | v6.0.0 Nov 29, 2026 | 8.0 | 6 | MaintainedLaravel 6 no longer gets security fixes | Docs: Read the v6.x docs |
Maintenance
- Latest release
- v13.0.0
- Nov 29, 2026 (11 hours ago)
From the package's releases and its GitHub Actions. A passing run means the test suite passed on develop, on every PHP version it supports; it isn't a security review, and each release line has its own runs on GitHub. Checked hourly.
A quick look
Declare the fileables once, then save and manage files through the model.
1public function fileables(): array 2{ 3 return [ 4 File::make('cover')->images()->thumbnail(width: 400), 5 File::make('gallery')->images()->multiple()->maxFiles(20)->convert('webp'), 6 ]; 7} 8 9$product = Product::create(['name' => 'Laptop', 'cover' => $cover, 'gallery' => $photos]);10 11$product->file('cover')->url;12$product->file('gallery')->add($photo, position: 1);13$product->file('gallery')->active()->get();Everything a model needs for its files
One fileables() method declares them; handlers do the rest.
Typed Fileables
images(), videos(), audios(), documents(), archives() and mixed(), each with only its own settings.
Ordered Lists
multiple() fileables keep positions from 1, with add() at a position, moves and reorder().
Saved With the Model
Give files to create() or update(): they are checked before the model is written and stored right after it.
Activation and Metadata
disable() a file without deleting it, and keep alt text or captions with setMeta().
Processing on Request
Thumbnails, resizing, WebP conversion and FFmpeg video processing, only when a definition asks.
Safe by Design
Types checked from content, owner-row locks for concurrent writes, and shared uploads never deleted while in use.
AI Ready
Ships a Laravel Boost guideline and a has-files-development skill, so php artisan boost:install teaches Claude Code, Cursor, Codex or Copilot the whole API.
Resources
- DocumentationInstallation, configuration and every API, per version.
- Source on GitHubRead the code, star it, or watch for releases.
- PackagistVersions and install statistics.
- Release notesWhat changed in each release.
- Report an issueFound a bug or missing a feature? Tell us.
- ContributeOpen a pull request; every contributor is credited.
Has Files Questions
Quick answers about installing and using Has Files.
What is Has Files?
Attach images, videos, audio, documents and other files to Eloquent models, with typed declarations, ordering, activation, metadata and processing through Laravel Uploader. It's a free, open-source Laravel package by Pharaonic.
How do I install Has Files?
Run composer require pharaonic/laravel-has-files in your project's root directory, then php artisan migrate.
What does Has Files require?
The latest release requires PHP 8.3 – 8.5 and Laravel 13. FFmpeg is needed only for video and audio processing.
Does it replace Has Images?
Yes. Images are a fileable type now: declare them with images().
Are thumbnails made automatically?
No. Files are stored as they are uploaded. Call thumbnail() on a definition to make thumbnails, and the other processing methods for resizing, conversion or compression.
Can one upload belong to several models?
Yes. Attach an existing Upload to as many models as you like; each attachment has its own position, activation and metadata, and the upload is never deleted while one of them uses it.
Is Has Files free to use?
Yes. Has Files is open source under the MIT license, so you can use it in personal and commercial projects.
Where can I find the Has Files documentation?
Read the Has Files documentation for setup, configuration, and usage examples.
How do I report a bug or contribute to Has Files?
Open an issue or a pull request on GitHub, ask in GitHub Discussions, or chat with us on Discord.
Ready to dig in?
Read the full documentation for installation, definitions, processing, saving with models, ordering, activation, metadata, events and real-world examples.